{% extends "projects/base.html" %}

{% load i18n %}
{% load project_tags %}

{% block head_title %}Tasks for {{ other_user }}{% endblock %}

{% block body %}
    <h1>{% blocktrans %}Tasks for {{ other_user }}{% endblocktrans %}</h1>
    
    {% ifequal request.user other_user %}
        
        {% if tasks %}
            {% regroup tasks by get_state_display as tasks_by_state %}
            {% for state in tasks_by_state %}
                <h2 class="join_date">{{ state.grouper }}</h2>
                
                {% for task in state.list %}
                    {% show_task task %}
                {% endfor %}
            {% endfor %}
        {% else %}
            {% trans "You have no tasks right now." %}
        {% endif %}
        
    {% else %}
        <p>You are not allowed to view another person's tasks at this time.</p>
    {% endifequal %}
{% endblock %}
